﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SmartMathLibrary.NumericalIntegration
{
    /// <summary>
    /// This class represents an multivariate integral.
    /// </summary>
    [Serializable]
    public class MultivariateIntegral
    {
        /// <summary>
        /// This field holds the lower borders of the integral.
        /// </summary>
        private GeneralVector a;

        /// <summary>
        /// This field holds the upper borders of the integral.
        /// </summary>
        private GeneralVector b;

        /// <summary>
        /// This field holds function of the integral.
        /// </summary>
        private IHardMultivariateRealFunction function;

        /// <summary>
        /// Initializes a new instance of the <see cref="MultivariateIntegral"/> class.
        /// </summary>
        /// <param name="a">The lower borders of the integral.</param>
        /// <param name="b">The upper borders of the integral.</param>
        /// <param name="function">The function of the integral.</param>
        public MultivariateIntegral(GeneralVector a, GeneralVector b, HardMultivariateRealFunction function)
        {
            this.a = a;
            this.b = b;
            this.function = function;
        }

        /// <summary>
        /// Initializes a new instance of the <see cref="MultivariateIntegral"/> class.
        /// </summary>
        /// <param name="a">The lower borders of the integral.</param>
        /// <param name="b">The upper borders of the integral.</param>
        /// <param name="function">The function of the integral.</param>
        public MultivariateIntegral(GeneralVector a, GeneralVector b, IHardMultivariateRealFunction function)
        {
            this.a = a;
            this.b = b;
            this.function = function;
        }

        /// <summary>
        /// Gets or sets the lower borders of the integral.
        /// </summary>
        /// <value>The lower borders of the integral.</value>
        public GeneralVector A
        {
            get { return this.a; }
            set { this.a = value; }
        }

        /// <summary>
        /// Gets or sets the upper borders of the integral.
        /// </summary>
        /// <value>The upper borders of the integral.</value>
        public GeneralVector B
        {
            get { return this.b; }
            set { this.b = value; }
        }

        /// <summary>
        /// Gets or sets the function of the integral.
        /// </summary>
        /// <value>The function of the integral.</value>
        public IHardMultivariateRealFunction Function
        {
            get { return this.function; }
            set { this.function = value; }
        }
    }
}